package com.khaled.protclass.model.bean.protein;

import com.khaled.protclass.model.base.IProtein;

public abstract class BaseProtein implements IProtein
{
	protected String proteinID;

	protected String proteinSequence;

	protected String classification;

	protected int proteinIndex;

	@Override
	public String getClassification()
	{
		return classification;
	}

	@Override
	public String getProteinSequence()
	{
		return this.proteinSequence;
	}

	@Override
	public String getProteinID()
	{
		return this.proteinID;
	}

	public int getProteinIndex()
	{
		return proteinIndex;
	}

	public void setProteinIndex(int proteinIndex)
	{
		this.proteinIndex = proteinIndex;
	}

	@Override
	public boolean equals(Object obj)
	{
		if (obj instanceof IProtein)
		{
			IProtein protein = (IProtein) obj;
			if (getProteinID().equals(protein.getProteinID())) { return true; }
		}
		return false;
	}

	@Override
	public int compareTo(IProtein o)
	{
		if (o instanceof IProtein)
		{
			IProtein protein = (IProtein) o;
			return protein.getProteinID().compareToIgnoreCase(this.getProteinID());
		}

		return 0;
	}

	public void setProteinID(String proteinID)
	{
		this.proteinID = proteinID;
	}

}
